package com.rain.web.product;


import com.rain.service.product.ProductService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import com.rain.base.BaseController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wu
 * @since 2021-03-21
 */
@RestController
@RequestMapping("/product")
@Api(tags = "产品", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public class ProductController extends BaseController {

    @Autowired
    private ProductService productService;

    @PostMapping("/deductNum")
    @ApiOperation(value = "减少库存")
    public Boolean deductNum() {
        return productService.deductNum();
    }

    @GetMapping("/test")
    @ApiOperation(value = "测试")
    public String test() {
        return "测试";
    }


}

